<?php
class StaticPageDAO extends BaseDAO{
	function loadMenuUser($fields, $id, $idFldName = 'id'){
		$conn = $this->db->getConnection();
        if (!$conn){
            return false;
        }
        $query = "SELECT * " . " FROM page WHERE  $idFldName = '$id'";
		$query .=  " AND active = 1 ORDER BY created DESC LIMIT 1";
		        
        $result  = $this->db->executeQuery($query);

        if ($result) {       
	       $row = $this->db->getReader($result) ;   
		   $enquiry = array();
		   foreach($fields as $f) {
				$enquiry[$f] = $row[$f];			
		   }   	   

		}
		$this->db->closeConnection();
		return $enquiry;
	}
}
?>